local timerfd = require "cauchy.timerfd"

local _M = {}

_M.timeout = function(time, callbackFunc, ...)  
    local tfd = timerfd.create() 

    timerfd.settime(tfd, time)

    while true do 
        if timerfd.read(tfd) then 
            callbackFunc(...)
        end 
    end 
end 

return _M 